package cn.abyss.admin.ums.service;


import cn.abyss.admin.ums.model.UmsAdmin;
import cn.abyss.admin.ums.model.UmsAdminLoginLog;
import cn.abyss.admin.util.ResultMap;

import java.util.List;
import java.util.Map;

/**
 * Description:
 *
 * @author zhangsj
 * @date Created on 2021/8/19
 */
public interface UmsAdminService {

    /**
     * 新增
     * @param umsAdmin
     * @throws Exception
     */
    public void insert(UmsAdmin umsAdmin) throws Exception;

    /**
     * 修改
     * @param umsAdmin
     * @throws Exception
     */
    public void update(UmsAdmin umsAdmin) throws Exception;

    /**
     * 删除 -- 实体删除，一般不用
     * @param id
     * @throws Exception
     */
    public void delete(Long id) throws Exception;

    /**
     * 根据主键查询
     * @param id
     * @return
     * @throws Exception
     */
    public UmsAdmin getById(Long id) throws Exception;

    /**
     * 分页查询
     * @param map
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    public Map<String, Object> listForPage(Map<String, Object> map, int pageNum, int pageSize) throws Exception;

    /**
     * 条件查询
     * @param map
     * @return
     * @throws Exception
     */
    public List<UmsAdmin> query(Map<String, Object> map) throws Exception;

    /**
     * 合计查询
     * @param map
     * @return
     * @throws Exception
     */
    public ResultMap getSummation(Map<String, Object> map) throws Exception;

    void insertLoginLog(UmsAdminLoginLog loginLog);
}
